package com.fsm.file.controller;

import com.fsm.common.tools.Result.Result;
import com.fsm.file.service.FileService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartHttpServletRequest;

import java.net.http.HttpRequest;

@RestController
@Tag(name = "文件控制接口")
@RequestMapping("/file")
public class FileController {
    @Autowired
    private FileService fileService;

    /**
     * 上传文件
     *
     * @param
     * @return
     */
    @PostMapping("uploadFile")
    @Operation(summary="上传文件",description="上传文件")
    public Result uploadFile(HttpServletRequest request) throws Exception{
        return fileService.uploadFile(request);
    }



}
